<template>
    <div class="one">
    <section>
        <p @click="back">⬅</p>
        <div class="wow">
            <b>那年今日</b>
        </div>
    </section>
    <van-tabs v-model:active="activeName">
  <van-tab title="热度排序" name="a"></van-tab>
  <van-tab title="时间排序" name="b"></van-tab>
 
</van-tabs>

    <div class="box" v-for="item in nice" :key="item.id">
        <img :src="item.poster" alt="" class="pic">
        <div class="more">
            <h5>{{ item.title }}</h5>
            <span class="git">{{ item.category }}</span><span class="file">{{ item.year }}</span>
            <h6>{{ item.genres }}</h6>
            <p class="countries">{{ item.countries }}</p>
        </div>
        <div>
            <span class="great">{{ item.rating }}分</span>
        </div>
    </div>
    </div>
</template>
<script>
import { hotmove } from '@/api/all/index';

export default {
    data() {
        return {
            nice: [],//那年今日的电影列表
        }
    },
   
    methods: {
        back() {
            this.$router.back();
        }
    },
    created() {
        hotmove().then(res => {
            console.log(res);
            this.nice = res.data.data;
        })
    }
}
</script>

<style lang="scss" scoped>
.one {
    height: 100%;
    width: 100%;
    position: relative;
}

section {
    width: 100%;
    height: 80px;
    background-color: red;
    display: flex;

    p {
        width: 50px;
        height: 30px;
        color: white;
        line-height: 80px;
        margin-left: 10px;
    }

    .wow {
        width: 150px;
        height: 30px;
        border-left: 1px solid white;
        text-align: center;
        margin-top: 25px;

        b {
            color: white;
        }
    }

}

.box {
    width: 100%;
    height: 150px;
    background-color: #fff;
    border-top: 1px solid gray;
    border-bottom: 1px solid gray;
    display: flex;

    .pic {
        width: 90px;
        height: 140px;
       margin-top: 5px;
    }
}
.more{

    width:220px;
    height:100px;
    h5{
    font-size: 20px;
}
.git{
    font-size: 14px;
    color:red;
    margin-right: 10px;
}
.file{
    font-size: 14px;
}
h6{
    font-size: 15px;
    font-weight: normal;
}
.countries{
    font-size: 15px;
}


}
.great{
    font-size: 18px;
    color:red;

}

</style>